﻿<Views:ViewPage
    x:Class="SecureBox.UI.ViewPage.PasswordViewPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit" xmlns:custom="clr-namespace:SecureBox.Controls;assembly=SecureBox.Controls" xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" xmlns:Views="clr-namespace:PhoneCore.Framework.Views;assembly=PhoneCore.Framework" xmlns:Command="clr-namespace:PhoneCore.Framework.Views.Command;assembly=PhoneCore.Framework" FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="800" d:DesignWidth="480"
    DataContext="{Binding Password, Source={StaticResource Locator}}"
    shell:SystemTray.IsVisible="False">
    <Grid x:Name="LayoutRoot">
        <Grid.Background>
            <ImageBrush ImageSource="/Resources/Images/LibraryBackground.jpg"/>
        </Grid.Background>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
            <TextBlock x:Name="ApplicationTitle" Text="SECURE BOX" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock x:Name="PageTitle" Text="password" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
        </StackPanel>
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
            <StackPanel Orientation="Vertical">
                <!-- name -->
                <TextBlock Text="Name"
                           Foreground="{StaticResource PhoneSubtleBrush}"
                           Margin="12,-24,0,0"/>
                <toolkit:PhoneTextBox Hint="name of your password in library"
                                    Text="{Binding Name, Mode=TwoWay}"
                                    MaxLength="64"
                                    LengthIndicatorVisible="True"
                                    InputScope="Text"/>
                <!-- keywords -->
                <TextBlock Text="Keywords"
                           Foreground="{StaticResource PhoneSubtleBrush}"
                           Margin="12,-24,0,0"/>
                <toolkit:PhoneTextBox Hint="keywords for searching"
                                    Text="{Binding Keyword, Mode=TwoWay}"  
                                    MaxLength="64"
                                    LengthIndicatorVisible="True"
                                    InputScope="Text"/>
                <!-- password -->
                <TextBlock Text="Password"
                           Foreground="{StaticResource PhoneSubtleBrush}"
                           Margin="12,-24,0,0"/>
                <toolkit:PhoneTextBox Hint="your password"
                                    Text="{Binding Password, Mode=TwoWay}"  
                                    ActionIcon="/Resources/Images/Actions/Refresh.png"
                                    MaxLength="200"
                                    LengthIndicatorVisible="True"
                                    InputScope="Text">
                    <i:Interaction.Triggers>
                        <i:EventTrigger EventName="ActionIconTapped">
                            <Command:ExecuteCommandAction Command="{Binding PasswordActionIconTappedCommand}" />
                        </i:EventTrigger>
                    </i:Interaction.Triggers>
                </toolkit:PhoneTextBox>
            </StackPanel>
        </Grid>
        <custom:BindableApplicationBar x:Name="AppBar" BarOpacity="0.2">
            <custom:BindableApplicationBarIconButton Command="{Binding SaveCommand}" IconUri="/Resources/Images/AppBar/appbar.save.png" Text="Save" />
            <custom:BindableApplicationBarIconButton Command="{Binding CancelCommand}" IconUri="/Resources/Images/AppBar/appbar.cancel.png" Text="Cancel" />
        </custom:BindableApplicationBar>

    </Grid>
 </Views:ViewPage>
